package com.CST.entity.zx;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Objects;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.alibaba.excel.annotation.ExcelProperty;

/**
 * @author ly
 * @since 2023-02-27
 */
@ApiModel(value = "数据项")
@Data
@TableName("ZX_DataEntry")
public class ZxDataentry implements Serializable {

    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "数据项id")
    @TableId(value = "id", type = IdType.AUTO)
    @ExcelIgnore
    private Long id;

    @ApiModelProperty(value = "数据项名称")
    @ExcelProperty("数据项名称")
    private String entryName;

    @ApiModelProperty(value = "数据项编码")
    @ExcelProperty(value = "数据项编码")
    private String entryCode;

    @ApiModelProperty(value = "数据项排序")
    @ExcelProperty(value = "数据项排序")
    private Integer entryOrder;

    @ApiModelProperty(value = "数据项描述")
    @ExcelProperty(value = "数据项描述")
    private String entryDescription;

    @ApiModelProperty(value = "是否启用,1启用，0停用")
    @ExcelIgnore
    private Integer enableFlag;

    @ApiModelProperty(value = "数据字典编码")
    @ExcelProperty(value = "数据字典编码")
    private String dictCode;

    @ApiModelProperty(value = "逻辑删除")
    @TableLogic
    @ExcelIgnore
    private String delete_flag;


    @ApiModelProperty("第几页")
    @TableField(exist = false)
    @ExcelIgnore
    private Integer pageNo;
    @TableField(exist = false)
    @ApiModelProperty("每页几条数据")
    @ExcelIgnore
    private Integer pageSize;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ZxDataentry that = (ZxDataentry) o;
        return Objects.equals(entryCode, that.entryCode);
    }

    @Override
    public int hashCode() {
        return Objects.hash(entryCode);
    }
}
